package org.example.mulitithreading.ex3;

public class MyThread2 extends Thread{
    @Override
    public void run() {
        Money.lock.lock();
        try {
            Thread.sleep(10);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        Money.money = 90000;
        System.out.println("change money:" + Money.money);
        Money.lock.unlock();
    }
}
